package cn.dxh.stagefinal.bean;


import java.math.BigDecimal;
import java.util.Date;

public class Order {

  private Integer orderid;
  //实付金额
  private BigDecimal amountpaid;
  private Date orderdate;
  //订单来源
  private String source;
  //订单形式
  private String shape;
  //0未支付,1未发货,2已发货,3已完成,4已取消
  private Integer orderstate;
  //配送员
  private String deliveryman;
  private Integer commid;
  private Integer clientid;
  private Integer num;
  private Date paytime;
  private Commodity commodity;
  private Client client;
  //订单金额
  private BigDecimal ordermoney;
  //优惠金额
  private BigDecimal yhmoney;
  //优惠方式
  private String yhway;
  //支付方式
  private String payway;
  //订单编号
  private String ordernum;

  private Employee employee;
  private Role role;

  public void setOrderstate(Integer orderstate) {
    this.orderstate = orderstate;
  }

  public Employee getEmployee() {
    return employee;
  }

  public void setEmployee(Employee employee) {
    this.employee = employee;
  }

  @Override
  public String toString() {
    return "Order{" +
            "orderid=" + orderid +
            ", amountpaid=" + amountpaid +
            ", orderdate=" + orderdate +
            ", source='" + source + '\'' +
            ", shape='" + shape + '\'' +
            ", orderstate=" + orderstate +
            ", deliveryman=" + deliveryman +
            ", commid=" + commid +
            ", clientid=" + clientid +
            ", num=" + num +
            ", paytime=" + paytime +
            ", commodity=" + commodity.getCommName() +
            ", client=" + client.getUsername() +
            ", ordermoney=" + ordermoney +
            ", yhmoney=" + yhmoney +
            ", yhway='" + yhway + '\'' +
            ", payway='" + payway + '\'' +
            ", ordernum='" + ordernum + '\'' +
//            ", employee=" + employee.geteName() +
            '}';
  }

  public BigDecimal getOrdermoney() {
    return ordermoney;
  }

  public void setOrdermoney(BigDecimal ordermoney) {
    this.ordermoney = ordermoney;
  }

  public BigDecimal getYhmoney() {
    return yhmoney;
  }

  public void setYhmoney(BigDecimal yhmoney) {
    this.yhmoney = yhmoney;
  }

  public String getYhway() {
    return yhway;
  }

  public void setYhway(String yhway) {
    this.yhway = yhway;
  }

  public String getPayway() {
    return payway;
  }

  public void setPayway(String payway) {
    this.payway = payway;
  }

  public String getOrdernum() {
    return ordernum;
  }

  public void setOrdernum(String ordernum) {
    this.ordernum = ordernum;
  }

  public Commodity getCommodity() {
        return commodity;
    }

    public void setCommodity(Commodity commodity) {
        this.commodity = commodity;
    }

    public Client getClient() {
        return client;
    }

    public void setClient(Client client) {
        this.client = client;
    }

    public Integer getOrderid() {
    return orderid;
  }

  public void setOrderid(Integer orderid) {
    this.orderid = orderid;
  }


  public BigDecimal getAmountpaid() {
    return amountpaid;
  }

  public void setAmountpaid(BigDecimal amountpaid) {
    this.amountpaid = amountpaid;
  }


  public Date getOrderdate() {
    return orderdate;
  }

  public void setOrderdate(Date orderdate) {
    this.orderdate = orderdate;
  }


  public String getSource() {
    return source;
  }

  public void setSource(String source) {
    this.source = source;
  }


  public String getShape() {
    return shape;
  }

  public void setShape(String shape) {
    this.shape = shape;
  }


  public Integer getOrderstate() {
    return orderstate;
  }

  public void setState(Integer orderstate) {
    this.orderstate = orderstate;
  }


  public String getDeliveryman() {
    return deliveryman;
  }

  public void setDeliveryman(String deliveryman) {
    this.deliveryman = deliveryman;
  }


  public Integer getCommid() {
    return commid;
  }

  public void setCommid(Integer commid) {
    this.commid = commid;
  }


  public Integer getClientid() {
    return clientid;
  }

  public void setClientid(Integer clientid) {
    this.clientid = clientid;
  }


  public Integer getNum() {
    return num;
  }

  public void setNum(Integer num) {
    this.num = num;
  }


  public Date getPaytime() {
    return paytime;
  }

  public void setPaytime(Date paytime) {
    this.paytime = paytime;
  }

}
